// отправка формы поиска
function FormSend() {
  // формирование запроса
  var query = "/search", elems_array = ["price-min", "price-max", "offtime-min", "offtime-max", "gearpower-max", "gearpower-min", "noiselevel-max", "noiselevel-min", "fuelrate-min", "fuelrate-max", "ufuelrate-min", "ufuelrate-max", "fuelvol-min", "fuelvol-max", "timework-min", "timework-max", "actpower-min", "actpower-max", "maxpower-min", "maxpower-max", "fullpower-min", "fullpower-max", "curstrength-min", "curstrength-max", "noiselevel-min", "noiselevel-max", "height-min", "height-max", "depth-min", "depth-max", "width-min", "width-max", "weight-min", "weight-max"];
  for(var i = 0; i < elems_array.length; i++) {
    var elem = $("#" + elems_array[i]);
    if(elem.obj() && elem.value != undefined && elem.value() != "") {query += "~" + elems_array[i] + "=" + elem.value();}
  }
  elems_array = ["type", "invert", "welding", "start", "eng-makers", "maker", "ncyl", "nfaz", "ncyl", "ntakt", "nturns", "fueltype", "n380", "exit12", "n220", "gearlife", "gentype", "brusgen", "saveclass", "nosound", "wheels", "muffler", "overloadsafe", "voltmeter", "hourmeter", "exit12"];
  for(var i = 0; i < elems_array.length; i++) {
    var value = "";
    for(var j = 1; $("#" + elems_array[i] + "_" + j).obj(); j++) {
      var elem = $("#" + elems_array[i] + "_" + j);
      if(elem.obj() && elem.value != undefined && elem.value() != "" && elem.obj().checked) {value += elem.value() + ";";}
    }
    if(value != "") {query += "~" + elems_array[i] + "=" + value;}
  }
  // переход
  window.location.href = query;
  return 0;
}